package com.neutech.base;

import java.awt.Graphics;
import java.awt.Image;

import com.neutech.constant.Constant;

public class Land extends Sprite{

	public Land() {}
	
	public Land(Image image) {
		super(0, Constant.WINDOW_HEIGHT-image.getHeight(null), image.getWidth(null),image.getHeight(null) ,
			  0, 0, image.getWidth(null), image.getHeight(null), image);
	}
	
	@Override
	public void draw(Graphics g) {
		g.drawImage(getImage(), getX(), getY(), null);
	}
	
	@Override
	public void move() {
		setX(getX()-Constant.SPEED);
		if(getX()<=-(getImage().getWidth(null)-Constant.WINDOW_WIDTH))
			setX(0);
	}
}
